let t = require;
let  e = module
let  o =  e.exports;
 o.default =  e.exports;

                'use strict';
                console.log("start");
                var _n7,
                    i =
                    (this && this.__extends) ||
                    ((_n7 = function n(t, e) {
                            return (_n7 =
                                Object.setPrototypeOf ||
                                ({
                                        __proto__: []
                                    }
                                    instanceof Array &&
                                    function(t, e) {
                                        t.__proto__ = e;
                                    }) ||
                                function(t, e) {
                                    for (var o in e) {
                                        Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
                                    }
                                })(t, e);
                        }),
                        function(t, e) {
                            function o() {
                                this.constructor = t;
                            }
                            _n7(t, e),
                                (t.prototype =
                                    null === e ?
                                    Object.create(e) :
                                    ((o.prototype = e.prototype), new o()));
                        });
                Object.defineProperty(o, '__esModule', {
                        value: !0
                    }),
                    (o.AbsActor = o.ActorEvent = o.ActorState = o.ActorType = void 0);
                var r,
                    a,
                    s = t('AbsObject'),
                    c = t('AbsAction'),
                    l = t('TimeMrg'),
                    u = t('ClassUtils'),
                    h = t('ComUtils');
                (function(t) {
                    (t[(t.Hero = 1)] = 'Hero'),
                    (t[(t.Player = 2)] = 'Player'),
                    (t[(t.Monster = 3)] = 'Monster'),
                    (t[(t.Npc = 4)] = 'Npc'),
                    (t[(t.Animal = 5)] = 'Animal'),
                    (t[(t.Soldier = 6)] = 'Soldier'),
                    (t[(t.BaseCamp = 7)] = 'BaseCamp'),
                    (t[(t.Mine = 8)] = 'Mine'),
                    (t[(t.ArcherTower = 9)] = 'ArcherTower'),
                    (t[(t.Barracks = 10)] = 'Barracks'),
                    (t[(t.Item = 11)] = 'Item'),
                    (t[(t.Buff = 12)] = 'Buff'),
                    (t[(t.Money = 13)] = 'Money'),
                    (t[(t.Box = 14)] = 'Box'),
                    (t[(t.Building = 15)] = 'Building'),
                    (t[(t.Effect = 16)] = 'Effect');
                })(o.ActorType || (o.ActorType = {})),
                (function(t) {
                    (t[(t.Normal = 0)] = 'Normal'),
                    (t[(t.Appear = 1)] = 'Appear'),
                    (t[(t.Idle = 2)] = 'Idle'),
                    (t[(t.Await = 3)] = 'Await'),
                    (t[(t.Move = 4)] = 'Move'),
                    (t[(t.Jump = 5)] = 'Jump'),
                    (t[(t.Fly = 6)] = 'Fly'),
                    (t[(t.Attack = 7)] = 'Attack'),
                    (t[(t.Defense = 8)] = 'Defense'),
                    (t[(t.Hurt = 9)] = 'Hurt'),
                    (t[(t.Tumble = 10)] = 'Tumble'),
                    (t[(t.Revive = 11)] = 'Revive'),
                    (t[(t.Die = 12)] = 'Die'),
                    (t[(t.Chaos = 13)] = 'Chaos'),
                    (t[(t.Dizzy = 14)] = 'Dizzy'),
                    (t[(t.Invincible = 15)] = 'Invincible'),
                    (t[(t.Build = 16)] = 'Build'),
                    (t[(t.Recycle = 17)] = 'Recycle');
                })((r = o.ActorState || (o.ActorState = {}))),
                (function(t) {
                    (t.ModelChanged = 'ActorEvent_ModelChanged'),
                    (t.PathChanged = 'ActorEvent_PathChanged'),
                    (t.StateChanged = 'ActorEvent_StateChanged'),
                    (t.AddBuff = 'ActorEvent_AddBuff'),
                    (t.RemoveBuff = 'ActorEvent_RemoveBuff'),
                    (t.WeaponLength = 'ActorEvent_WeaponLength'),
                    (t.ScoreChanged = 'ActorEvent_ScoreChanged'),
                    (t.KillsChanged = 'ActorEvent_KillsChanged'),
                    (t.Miss = 'ActorEvent_Miss'),
                    (t.HPChanged = 'ActorEvent_HPChanged'),
                    (t.ArmatureStart = 'ACTOR_EVENT_ASTART'),
                    (t.ArmatureComplete = 'ACTOR_EVENT_ACOMPLETE'),
                    (t.ArmatureLoopComplete = 'ACTOR_EVENT_ALCOMPLETE'),
                    (t.ArmatureEvent = 'ACTOR_EVENT_ARMATUREEVENT');
                })((a = o.ActorEvent || (o.ActorEvent = {})));
                var p = (function(t) {
                    function e(o) {
                        void 0 === o && (o = null);
                        var n = t.call(this) || this;
                        return (
                            (n.speed = 0),
                            (n._id = e.ACTORID--),
                            (n.state = r.Normal),
                            (n._actions = {}),
                            (n._animSpeed = 1),
                            (n._entity = o || new cc.Node()),
                            n.onInit(),
                            n
                        );
                    }
                    return (
                        i(e, t),
                        (e.prototype.onInit = function() {}),
                        (e.prototype.lookTarget = function() {}),
                        Object.defineProperty(e.prototype, 'isPause', {
                            get: function get() {
                                return this._isPause;
                            },
                            enumerable: !1,
                            configurable: !0
                        }),
                        (e.prototype.pause = function() {
                            (this._isPause = !0),
                            this._animator && (this._animator.timeScale = 0);
                        }),
                        (e.prototype.resume = function() {
                            (this._isPause = !1),
                            this._animator && (this._animator.timeScale = 1);
                        }),
                        (e.prototype.initByNet = function() {}),
                        Object.defineProperty(e.prototype, 'entity', {
                            get: function get() {
                                return this._entity;
                            },
                            enumerable: !1,
                            configurable: !0
                        }),
                        Object.defineProperty(e.prototype, 'scene', {
                            get: function get() {
                                return this._scene;
                            },
                            set: function set(t) {
                                this._scene = t;
                            },
                            enumerable: !1,
                            configurable: !0
                        }),
                        Object.defineProperty(e.prototype, 'animName', {
                            get: function get() {
                                return this._animName;
                            },
                            enumerable: !1,
                            configurable: !0
                        }),
                        Object.defineProperty(e.prototype, 'active', {
                            get: function get() {
                                return this._entity.active;
                            },
                            set: function set(t) {
                                this._entity.active = t;
                            },
                            enumerable: !1,
                            configurable: !0
                        }),
                        Object.defineProperty(e.prototype, 'buffCtrl', {
                            get: function get() {
                                return this._buffCtrl;
                            },
                            enumerable: !1,
                            configurable: !0
                        }),
                        (e.prototype.setId = function(t) {
                            this._id = t;
                        }),
                        Object.defineProperty(e.prototype, 'id', {
                            get: function get() {
                                return this._id;
                            },
                            enumerable: !1,
                            configurable: !0
                        }),
                        Object.defineProperty(e.prototype, 'type', {
                            get: function get() {
                                return this._type;
                            },
                            enumerable: !1,
                            configurable: !0
                        }),
                        Object.defineProperty(e.prototype, 'state', {
                            get: function get() {
                                return this._state;
                            },
                            set: function set(t) {
                                (this._state != r.Die ||
                                    this._state != r.Recycle ||
                                    (this._state == r.Die && t == r.Recycle)) &&
                                this._state != t &&
                                    ((this._state = t),
                                        this.onStateChanged(),
                                        this.emit(a.StateChanged, t));
                            },
                            enumerable: !1,
                            configurable: !0
                        }),
                        (e.prototype.clearState = function() {
                            this._state != r.Normal &&
                                ((this._state = r.Normal),
                                    this.onStateChanged(),
                                    this.emit(a.StateChanged, this._state));
                        }),
                        Object.defineProperty(e.prototype, 'isValid', {
                            get: function get() {
                                return (
                                    !!t.prototype.isValid &&
                                    null != this._entity &&
                                    this._state != r.Die &&
                                    this._state != r.Recycle
                                );
                            },
                            enumerable: !1,
                            configurable: !0
                        }),
                        (e.prototype.onStateChanged = function() {}),
                        Object.defineProperty(e.prototype, 'scale', {
                            get: function get() {
                                return this._model ?
                                    Math.abs(this._entity.scale * this._model.scale) :
                                    Math.abs(this._entity.scale);
                            },
                            set: function set(t) {
                                this._entity.scale = t;
                            },
                            enumerable: !1,
                            configurable: !0
                        }),
                        Object.defineProperty(e.prototype, 'res', {
                            get: function get() {
                                return this._res;
                            },
                            enumerable: !1,
                            configurable: !0
                        }),
                        Object.defineProperty(e.prototype, 'model', {
                            get: function get() {
                                return this._model;
                            },
                            enumerable: !1,
                            configurable: !0
                        }),
                        (e.prototype.setDisplayName = function(t) {
                            this._entity.name = t;
                        }),
                        (e.prototype.getDisplayName = function() {
                            return this._entity.name;
                        }),
                        (e.prototype.setType = function(t) {
                            this._type = t;
                        }),
                        (e.prototype.loadModel = function(t) {
                            this._res != t &&
                                (cc.resources.load(t, this.loadModelComplete.bind(this)),
                                    (this._res = t));
                        }),
                        (e.prototype.loadModelComplete = function(t, e) {
                            t ||
                                (cc.isValid(this.entity) && this.initModel(cc.instantiate(e)));
                        }),
                        (e.prototype.initModel = function(t) {
                            t &&
                                (h.default.setColor(t, this.entity.color),
                                    this._model && this._model.removeFromParent(),
                                    (t.position = cc.Vec3.ZERO),
                                    this.entity.addChild(t),
                                    (this._model = t),
                                    this.initAnimator(t.getComponent(sp.Skeleton)),
                                    this.onInitModel(t),
                                    this.emit(a.ModelChanged));
                        }),
                        (e.prototype.initAnimator = function(t) {
                            this.removeArmatureListener(),
                                t &&
                                (t.setStartListener(this.onAnimStartHandler.bind(this)),
                                    t.setCompleteListener(
                                        this.onAnimLoopCompleteHandler.bind(this)
                                    ),
                                    t.setEndListener(this.onAnimCompleteHandler.bind(this)),
                                    t.setEventListener(this.onAnimEventHandler.bind(this)),
                                    (t.timeScale = this._animSpeed),
                                    (this._animator = t),
                                    l.TimeMrg.timer.delayCall(this.playLastAnim, this, 0.1));
                        }),
                        (e.prototype.playLastAnim = function() {
                            null != this._animName &&
                                this.playAnim(this._animName, this._playTimes);
                        }),
                        (e.prototype.onAnimStartHandler = function(t) {
                            0 == t.trackIndex && this.emit(a.ArmatureStart, t);
                        }),
                        (e.prototype.onAnimLoopCompleteHandler = function(t) {
                            0 == t.trackIndex &&
                                (this._playTimes > 0 &&
                                    (this._playTimes--,
                                        0 == this._playTimes &&
                                        (this._animState && (this._animState.loop = !1),
                                            (this._animator.loop = !1))),
                                    this.emit(a.ArmatureLoopComplete, t));
                        }),
                        (e.prototype.onAnimEventHandler = function(t) {
                            0 == t.trackIndex && this.emit(a.ArmatureEvent, t);
                        }),
                        (e.prototype.onAnimCompleteHandler = function(t) {
                            0 == t.trackIndex && this.emit(a.ArmatureComplete, t);
                        }),
                        (e.prototype.onInitModel = function() {}),
                        (e.prototype.setPosition = function(t, e, o) {
                            this.entity && this.entity.setPosition(t, e, o);
                        }),
                        (e.prototype.update = function(t) {
                            this._isPause ||
                                (this._action && this._action.update(t),
                                    this._buffCtrl && this._buffCtrl.update(t),
                                    this.shadow &&
                                    (this.shadow.setPosition(this.entity.position),
                                        this.shadow.active != this.entity.active &&
                                        (this.shadow.active = this.entity.active),
                                        this.shadow.scale != this.entity.scale &&
                                        (this.shadow.scale = this.entity.scale))),
                                this.onUpdate(t);
                        }),
                        (e.prototype.onUpdate = function() {}),
                        (e.prototype.playAnim = function(t, e, o) {
                            return (
                                void 0 === e && (e = -1),
                                void 0 === o && (o = !1),
                                null != t &&
                                (this._animator ?
                                    this._animator.findAnimation(t) &&
                                    (this._animator.animation != t || o) &&
                                    ((this._animator.loop = 1 != e),
                                        (this._animState = this._animator.setAnimation(
                                            0,
                                            t,
                                            this._animator.loop
                                        )),
                                        (this._animName = t),
                                        this._animState && 1 == e && (this._animState.loop = !1)) :
                                    (this._animName = t),
                                    (this._playTimes = e)),
                                this._animState
                            );
                        }),
                        Object.defineProperty(e.prototype, 'animSpeed', {
                            get: function get() {
                                return this._animSpeed;
                            },
                            set: function set(t) {
                                this._animator && (this._animator.timeScale = t),
                                    (this._animSpeed = t);
                            },
                            enumerable: !1,
                            configurable: !0
                        }),
                        (e.prototype.act = function(t) {
                            for (var e = [], o = 1; o < arguments.length; o++) {
                                e[o - 1] = arguments[o];
                            }
                            if (this._entity) {
                                var n = u.default.getClassName(t),
                                    i = void 0;
                                if (this._action) {
                                    if (this._action.isRunning) {
                                        if (
                                            this._action.type != c.ActionType.Normal &&
                                            (this._action.type != c.ActionType.SameBlock ||
                                                n == u.default.getClassName(this._action))
                                        )
                                            return null;
                                        this._action.stop(), (i = this._actions[n]);
                                    } else i = this._actions[n];
                                } else i = this._actions[n];
                                null == i && ((i = new t(this)), (this._actions[n] = i)),
                                    i &&
                                    ((this._action = i),
                                        1 == e.length ? i.start(e[0]) : i.start(e));
                            }
                        }),
                        (e.prototype.stopAction = function() {
                            this._action && this._action.stop();
                        }),
                        (e.prototype.removeArmatureListener = function() {
                            null != this._animator &&
                                (this._animator.setStartListener(null),
                                    this._animator.setCompleteListener(null),
                                    this._animator.setEndListener(null),
                                    this._animator.setEventListener(null));
                        }),
                        (e.prototype.onDestroy = function() {
                            if ((t.prototype.onDestroy.call(this), this._entity)) {
                                for (var o in (this._buffCtrl &&
                                        (this._buffCtrl.destroy(), (this._buffCtrl = null)),
                                        this.shadow &&
                                        (this.shadow instanceof e ?
                                            (this.shadow.entity.parent = null) :
                                            (this.shadow.parent = null),
                                            (this.shadow = null)),
                                        (this._action = null),
                                        this._actions)) {
                                    this._actions[o].destroy();
                                }
                                (this._actions = null),
                                this.removeArmatureListener(),
                                    (this._animator = null),
                                    this._model && this._model.setParent(null),
                                    this._entity.setParent(null),
                                    (this._entity = null),
                                    (this._scene = null);
                            }
                        }),
                        (e.ACTORID = -1e3),
                        e
                    );
                })(s.AbsObject);
                (o.AbsActor = p), console.log("end");
            module.exports =  e.exports;